<template>
	<view>
		<u-navbar :is-back="true" :title="navbar.title" :background="navbar.background">
		</u-navbar>
		<view class="u-page">
			<view class="wrap">
				<u-button shape="circle" @click="scanQrCode">点击扫一扫</u-button>
			</view>
		</view>
		<footerBar></footerBar>
	</view>
</template>

<script>
	import request from "utils/request.js"
	export default {
		components: {
		},
		data() {
			return {
				navbar:{
					title: "扫码测试",
					background: {
						backgroundColor: '#001f3f',
						backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
					}
				}
			}
		},
		onLoad(data) {
			
		},
		methods: {
			scanQrCode() {
				uni.scanCode({
					success: function (res) {
						console.log('条码类型：' + res.scanType);
						console.log('条码内容：' + res.result);
					}
				});
			}
		}
	}
</script>

<style>
	.wrap {
		padding: 40rpx;
	}
</style>
